﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 权限表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_permission", DisableSyncStructure = true)]
	public partial class SpPermission 
	{
		[JsonProperty("ps_id"), Column(Name = "ps_id", DbType = "smallint(6) unsigned", IsPrimary = true, IsIdentity = true)]
		public int PsId { get; set; }

		/// <summary>
		/// 操作方法
		/// </summary>
		[JsonProperty("ps_a"), Column(Name = "ps_a", StringLength = 32, IsNullable = false)]
		public string PsA { get; set; }

		/// <summary>
		/// 控制器
		/// </summary>
		[JsonProperty("ps_c"), Column(Name = "ps_c", StringLength = 32, IsNullable = false)]
		public string PsC { get; set; }

		/// <summary>
		/// 权限等级
		/// </summary>
		[JsonProperty("ps_level"), Column(Name = "ps_level", InsertValueSql = "'0'")]
		public SpPermissionPSLEVEL PsLevel { get; set; }

		/// <summary>
		/// 权限名称
		/// </summary>
		[JsonProperty("ps_name"), Column(Name = "ps_name", StringLength = 20, IsNullable = false)]
		public string PsName { get; set; }

		/// <summary>
		/// 父id
		/// </summary>
		[JsonProperty("ps_pid"), Column(Name = "ps_pid", DbType = "smallint(6) unsigned")]
		public int PsPid { get; set; }

	}

	public enum SpPermissionPSLEVEL {
		/// <summary>
/// 0
/// </summary>
[Description("0")]
Unknow1 = 1, 
/// <summary>
/// 2
/// </summary>
[Description("2")]
Unknow2, 
/// <summary>
/// 1
/// </summary>
[Description("1")]
Unknow3
	}
}
